(function(){
  var deviceWidth = "",
      d = document.documentElement;
  window.onresize = setFont;
  setFont();
  function setFont(){
    deviceWidth = Math.min(640, window.innerWidth, d.clientWidth);
    d.style.fontSize = deviceWidth / 7.5 + "px";
  };
})();
